#pragma once

#include "DM/Core/Base.h"
#include "DM/Events/Event.h"

namespace DM {

	struct DM_API WindowProps
	{
		std::string Title;
		int Width;
		int Height;

		WindowProps(const std::string& title = "DM Engine", 
			int width = 1280, 
			int height = 720)
			:Title(title), Width(width), Height(height)
		{}
	};

	class DM_API Window
	{
	public:
		using EventCallbackFn = std::function<void(Event&)>;

		virtual ~Window(){}

		virtual void OnUpdate() = 0;
		virtual unsigned int GetWidth() const = 0;
		virtual unsigned int GetHeight() const = 0;

		virtual void SetEventCallback(const EventCallbackFn& callback) = 0;
		virtual void SetVSync(bool enable) = 0;
		virtual bool IsVSync() const = 0;
		virtual void* GetNativeWindow() const = 0;
		static Window* Create(const WindowProps& props = WindowProps());

	private:

	};

}